package org.yxjme.exjni_two;

import android.content.Context;
import android.content.Intent;
import android.util.Log;


/**
 * 静态注册  jni
 */
public class ExJNI {
    static {
        System.loadLibrary("ExJNI");
    }

    public ExJNI(){

    }


    private ExJNI(String s){
        Log.v("[showFiled]->","ExJNI = "+s) ;
    }



    public  native String getMessage();

    /**
     *
     *  jni 調用 java 中的方法
     *
     */
    public void showFiled(String str){
        Log.v("[showFiled]->","str = "+str) ;
    }



    public native ExJNI GetOBJ(String msg);


    /**
     * @param arrayList
     * @return
     */
    public native int arrayLength(int[] arrayList) ;

    /**
     * 让jni 调用
     *
     * @return
     */
    private String fun(int a){
        Log.v("===[fun]======","aaa = "+a) ;
        return "测试";
    }

    /**
     * jni中创建线程
     */
    public native void createJNIThread();
    public native void takePhoto(Context context);
    public native void recordVideo(Context context);

    /**
     * 跳转页面
     */
    private void toActivity(Context context,Class c){
        context.startActivity(new Intent(context,c));
    }

    /*实现录制视频功能*/
    /*https://blog.csdn.net/woshizisezise/article/details/51878566*/
}
